﻿<?php
	// create new database using the OOP approach
	$db=new SQLite3("db.sqlite");

	$db->exec('CREATE TABLE users ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,
				"username" VARCHAR NOT NULL,
				"password" VARCHAR NOT NULL)');
	$db->exec("INSERT INTO users (id,username,password) VALUES (1,'administrator','482c811da5d5b4bc6d497ffa98491e38');");

	$result = $db->query('SELECT username FROM users');
	var_dump($result->fetchArray());
?>